import request from '@/utils/request'

export function getBoolData(order_id) {
  return request({
    url: 'backend_get_bool_data',
    method: 'post',
    params:{order_id:order_id}
  })
}

export function getTongdunData(order_id) {
  return request({
    url: 'backend_get_tongdun_data',
    method: 'post',
    params:{order_id:order_id}
  })
}
// 获取订单
export function fetchAllListByDay(query) {
  return request({
    url: '/order/getBackendOrderListByDay',
    method: 'get',
    params: query
  })
}
// 获取订单
export function fetchAllListByMonth(query) {
  return request({
    url: '/order/getBackendOrderListByMonth',
    method: 'get',
    params: query
  })
}
export function fetchAllList(query) {
  return request({
    url: 'backend_order_list',
    method: 'get',
    params: query
  })
}
// 创建订单
export function createBackendOrder(data) {
  return request({
    url: 'backend_create_order',
    method: 'post',
    data
  })
}

export function acceptOrder(order_id) {
  return request({
    url: 'backend_order_accept',
    method: 'post',
    params:{order_id:order_id}
  })
}
// 获取商户和销售列表
export function fetchMarchantAndSale() {
  return request({
    url: 'backend_merchant_and_sale',
    method: 'get'
  })
}

// 获取初审订单
export function getBackendFirstOrder(query) {
  return request({
    url: '/order/getBackendFirstOrder',
    method: 'get',
    params: query
  })
}

// 获取信审订单
export function getBackendLetterOrder(query) {
  return request({
    url: '/order/getBackendLetterOrder',
    method: 'get',
    params: query
  })
}
// 获取合同订单
export function getBackendSignOrder(query) {
  return request({
    url: '/order/getBackendSignOrder',
    method: 'get',
    params: query
  })
}
// 获取术后订单
export function getBackendOperationOrder(query) {
  return request({
    url: '/order/getBackendOperationOrder',
    method: 'get',
    params: query
  })
}
// 获取退款订单
export function getBackendRefundOrder(query) {
  return request({
    url: '/order/getBackendRefundOrder',
    method: 'get',
    params: query
  })
}
// 获取订单记录
export function fetchOrderRecordListByOrderId(query) {
  return request({
    url: '/order/getOrderRecordListByOrderId',
    method: 'get',
    params: query
  })
}
// 订单详情，包括订单记录
export function fetchOrderDetail(order_id) {
  return request({
    url: 'backend_order_detail',
    method: 'post',
    params:{order_id:order_id}
  })
}

// 提交审核
export function submitCheckStatus(data) {
  return request({
    url: 'backend_order_exadmin',
    method: 'post',
    data
  })
}
// 修改订单基本信息
export function editOrderMainInfo(data) {
  return request({
    url: 'backend_order_edit_main',
    method: 'post',
    data
  })
}
// 修改订单合同信息
export function editOrderHt(data) {
  return request({
    url: 'backend_order_edit_ht',
    method: 'post',
    data
  })
}
// 修改订单信审资料信息
export function editOrderLetter(data) {
  return request({
    url: 'backend_order_edit_letter',
    method: 'post',
    data
  })
}
// 修改订单合同资料备注
export function updateOrderDesc(data) {
  return request({
    url: '/order/updateOrderDesc',
    method: 'post',
    data
  })
}
// 百融风控大数据
export function getBaiRongData(data) {
  return request({
    url: 'backend_get_bairong_data',
    method: 'post',
    data
  })
}
// 术后
export function operationSubmit(data) {
  return request({
    url: '/order/operationSubmit',
    method: 'post',
    data
  })
}
// 备注订单客户信息
export function descOrderMain(data) {
  return request({
    url: 'backend_order_desc',
    method: 'post',
    data
  })
}
// 退回信审
export function backLetter(data) {
  return request({
    url: 'backend_order_back_to_letter',
    method: 'post',
    data
  })
}
// 备注订单联系人信息
export function descOrderLetter(data) {
  return request({
    url: '/order/descOrderLetter',
    method: 'post',
    data
  })
}
// 获取通过点拒绝点
export function getOrderPoint(data) {
  return request({
    url: 'backend_get_order_point',
    method: 'post',
    data
  })
}
// 获取订单
export function getBackendSignOrderAll(data) {
  return request({
    url: 'backend_sign_order_all',
    method: 'get',
    data
  })
}

